package com.disease.chronic.Mappers;

import com.disease.chronic.pojo.AlertHistory;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AlertHistoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AlertHistory record);

    int insertSelective(AlertHistory record);

    @Select("SELECT ID, TIME, INDICATORNAME, VALUE, USERNAME FROM \"ALERTHISTORY\" WHERE USERNAME = #{username}")
    @Result(column = "INDICATORNAME", property = "indicatorName")
    List<AlertHistory> selectAllAlertHistory(@Param("username") String username);

    AlertHistory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AlertHistory record);

    int updateByPrimaryKey(AlertHistory record);
}